From: Florian Eckert Date: Wed, 10 Apr 2024 09:50:57 +0000 (+0200) Subject: luci-mod-network: fix look and feel for DNSMASQ IP-Sets generation X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=e994746b33a4280eefd6908743c99ef89a7b34d5;p=project%2Fluci.git luci-mod-network: fix look and feel for DNSMASQ IP-Sets generation On the configuration page of '/admin/network/dhcp' on the IP sets tab, it is possible to make changes directly in the table. However, this is not displayed correctly when using the theme 'luci-theme-material' if the options can be changed directly in this view. The problem is solved by not editing the configuration in the overview page but in the overlay page. Signed-off-by: Florian Eckert --- diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js index 7be024f68a..9a6240b69f 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js @@ -977,22 +977,22 @@ return view.extend({ so = ss.option(form.DynamicList, 'name', _('Name of the set')); so.rmempty = false; - so.editable = true; + so.editable = false; so.datatype = 'string'; so = ss.option(form.DynamicList, 'domain', _('FQDN')); so.rmempty = false; - so.editable = true; + so.editable = false; so.datatype = 'hostname'; so = ss.option(form.Value, 'table', _('Netfilter table name'), _('Defaults to fw4.')); - so.editable = true; + so.editable = false; so.placeholder = 'fw4'; so.rmempty = true; so = ss.option(form.ListValue, 'table_family', _('Table IP family'), _('Defaults to IPv4+6.') + ' ' + _('Can be hinted by adding 4 or 6 to the name.') + '
' + _('Adding an IPv6 to an IPv4 set and vice-versa silently fails.')); - so.editable = true; + so.editable = false; so.rmempty = true; so.value('inet', _('IPv4+6')); so.value('ip', _('IPv4'));